/**
 * autoCompleteDate
 * @param url 数据接口 用户: ${path}/user/address/autoCompleteData.do
 * @param autocompleteID 显示id
 * @param searchInfoID   内容id
 * @param autocompleteXID
 */
function autoCompleteDate(url, autocompleteID, searchInfoID, autocompleteXID) {
    $('#' + autocompleteID).autocomplete({
        serviceUrl: url,
        onSelect: function(suggestion) {
            $('#' + searchInfoID).val(suggestion.data);
        },
        onHint: function (hint) {
            $('#' + autocompleteXID).val(hint);
        }
    });
    $('#' + autocompleteID).bind('input propertychange', function() {
        var v = $('#' + autocompleteID).val();
        if(v == null || v == "" || v.length <= 0){
            $('#' + searchInfoID).val("");
        }
    });
}

function autoCompleteDateSellerVerify(url, autocompleteID, searchInfoID, autocompleteXID) {
    $('#' + autocompleteID).autocomplete({
        serviceUrl: url,
        onSelect: function(suggestion) {
            autoCheck();
            $('#' + searchInfoID).val(suggestion.data);
        },
        onHint: function (hint) {
            $('#' + autocompleteXID).val(hint);
        }
    });
    $('#' + autocompleteID).bind('input propertychange', function() {
        var v = $('#' + autocompleteID).val();
        if(v == null || v == "" || v.length <= 0){
            $('#' + searchInfoID).val("");
        }
    });
}
